﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using CustomsNuke.Scheduling.Utility;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CustomsNuke.Test
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class CustomsUnitTest
    {
        public CustomsUnitTest()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        // Use TestInitialize to run code before running each test 
        // [TestInitialize()]
        // public void MyTestInitialize() { }
        //
        // Use TestCleanup to run code after each test has run
        // [TestCleanup()]
        // public void MyTestCleanup() { }
        //
        #endregion

        [TestMethod]
        public void TestGetLadingInfo()
        {
            string containerNo = "CCLA6766649";//CCLU6766649,CCLU7036368
            string shipName = "";// "LU HE";
            string shipNo = "";// "179W";
            LadingResult result = CustomsAnalysUtils.GetLadingInfo(containerNo, shipName, shipNo);

            Assert.IsNull(result);
        }

        [TestMethod]
        public void TestGetCodecoInfo()
        {
            string containerNo = "CCLA6766649";//CCLU6766649,CCLU7036368

            CodecoResult result = CustomsAnalysUtils.GetCodecoInfo(containerNo);



            Assert.IsNull(result);
        }

        [TestMethod]
        public void TestGetAdmissionInfo()
        {
            string containerNo = "CCLU7036368";//CCLU6766649,CCLU7036368
            string shipName = "";//
            string shipNo = "";//

            List<AdmissionResult> result = CustomsAnalysUtils.GetAdmissionInfo(containerNo, shipName, shipNo);

            Assert.IsNull(result);
        }

        [TestMethod]
        public void TestGetOnboardingInfo()
        {
            string containerNo = "TCNU7646702";//洋山三期UESU4547870，洋山一期KKFU1734157,外二期HAHU4010273,外五期GESU2656688,其它CBHU8926509,外四期TCNU7646702
            string dock = "外四期";//

            bool b = string.IsNullOrEmpty("");

            OnboardingResult result = CustomsAnalysUtils.GetOnboardingInfo(containerNo, dock);

            Assert.IsNull(result);
        }
    }
}
